package demo3;

import demo2.Car;
import demo2.IShape;

public class Test {
    public static void main(String[] args) {
        Macbook macbook = new Macbook();
        Mouse mouse = new Mouse();
        Keyboard keyboard = new Keyboard();

        macbook.openDevice();
        macbook.useDevice(mouse);
        macbook.closeDevice();

        System.out.println("--------");

        macbook.openDevice();
        macbook.useDevice(keyboard);
        macbook.closeDevice();


    }
}
